

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main" />
    <title>Register User</title>
  </head>
  <body>
    <g:render template="/menu" />
    <div class="body">
      <h1>Register User</h1>
      <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
      </g:if>
      <g:hasErrors bean="${userInstance}">
        <div class="errors">
          <g:renderErrors bean="${userInstance}" as="list" />
        </div>
      </g:hasErrors>
      <g:form action="save" method="post" enctype="multipart/form-data" >
        <div class="dialog">
          <table>
            <tbody>
              <tr class="prop">
                <td valign="top" class="name">
                  <label for="avatar">Photo:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:userInstance,field:'avatar','errors')}">
                  <input type="file" name="avatar" id="avatar" value="${fieldValue(bean:userInstance,field:'avatar')}" />
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="userName">User Name:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:userInstance,field:'userName','errors')}">
                  <input type="text" id="userName" name="userName" value="${fieldValue(bean:userInstance,field:'userName')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="passWord">Pass Word:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:userInstance,field:'passWord','errors')}">
                  <input type="text" id="passWord" name="passWord" value="${fieldValue(bean:userInstance,field:'passWord')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="dateOfBirth">Date Of Birth:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:userInstance,field:'dateOfBirth','errors')}">
            <g:datePicker name="dateOfBirth" value="${userInstance?.dateOfBirth}" precision="minute" ></g:datePicker>
            </td>
            </tr>

            </tbody>
          </table>
        </div>
        <div class="buttons">
          <span class="button"><input class="save" type="submit" value="Create" /></span>
        </div>
      </g:form>
    </div>
  </body>
</html>
